package com.fourforfo.fourmall.cart.feign;

import com.fourforfo.common.to.ProductSkuInfoTO;
import com.fourforfo.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @program: fourmall
 * @description: 商品服务远程接口
 * @author: fourforfo
 * @email: fourforfo@gmail.com
 * @create: 2022-08-24 20:00
 **/

@FeignClient("fourmall-product")
public interface ProductFeignService {

    /**
     * 信息
     */
    @ResponseBody
    @GetMapping("product/skuinfo/infoAndAttr/{skuId}")
    R infoAndAttr(@PathVariable("skuId") Long skuId);

    @ResponseBody
    @PostMapping("product/skuinfo/listPrices")
    Map<Long, BigDecimal> listPriceByIds(@RequestBody List<Long> skuIds);

}
